<template>

        <div id='zfx'>


        
        <el-form  label-width="80px" class="login_from">
        <el-form-item label="账号">
            <el-input v-model="LoginReqest.username"></el-input>
        </el-form-item>

        <el-form-item label="密码">
            <el-input v-model="LoginReqest.password"></el-input>
        </el-form-item>

        <el-form-item class="btns">
                <el-button type="primary" @click="dlymbutton">登录</el-button>
                <el-button type="info">重置</el-button>
        </el-form-item>

        </el-form>

        
        </div>


</template>


<script>
export default {
    data(){
    return{
            LoginReqest:{
                username:'asdf1',
                password:'1234'
            }
    }

    },methods:{
            async dlymbutton(){
                    const{data:res}=await this.$http.post('sp_manager',this.LoginReqest)
                    console.log(res);
                    if(res.meta.status!=200){
                        this.$message.warning('登录失败')
                        return
                      }
                     this.$message.info('登录成功')
                     this.$router.push('/zym')
                }



    }



}
</script>






<style scoped>
    #zfx{
        background-color: rgb(118, 215, 253);
        width: 500px;
        height: 400px;
        position:absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
    }
    .btns{
        display:flex;
        justify-content:center;
        
    }
    .login_from{

        width: 100%;
        position:absolute;
        top: 30%;
        padding:0 40px;
        box-sizing: border-box;       
    }


    

</style>